import java.io.File;
import java.io.IOException;

public class Demo_File3 {
    public static void main(String[] args) {
        File file = new File("d:/test/test.txt");
        file.deleteOnExit();
        System.out.println(file.exists());
    }
    public static void main1(String[] args) throws IOException {
        File file = new File("d:/test/test1.txt");
        System.out.println(file.exists());
        System.out.println(file.createNewFile());
        System.out.println(file.exists());
        System.out.println(file.delete());
        System.out.println(file.exists());
    }
}
